﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SMIS.Dals;
using SMIS.Entities;

namespace SMIS
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            
            
            if (treeView1.SelectedNode.Text == "添加工种")
            {
                FormAddJob formAddjob = new FormAddJob();
                formAddjob.ShowDialog();
            }

            if (treeView1.SelectedNode.Text == "浏览工种")
            {
                FormJob formJob = new FormJob();
                formJob.ShowDialog();
            }

            if (treeView1.SelectedNode.Text == "添加部门")
            {
                FormAddDepart formAddDepart = new FormAddDepart();
                formAddDepart.ShowDialog();
            }

            if (treeView1.SelectedNode.Text == "浏览部门")
            {
                FormDepart formDepart = new FormDepart();
                formDepart.ShowDialog();
            }

            if (treeView1.SelectedNode.Text == "添加员工")
            {
                FormAddStaff formAddStaff = new FormAddStaff();
                formAddStaff.ShowDialog();
            }

            if (treeView1.SelectedNode.Text == "浏览员工")
            {
                FormStaff formStaff = new FormStaff();
                formStaff.ShowDialog();
            }

            if (treeView1.SelectedNode.Text == "添加收入")
            {
                FormAddIncome formAddIncome = new FormAddIncome();
                formAddIncome.ShowDialog();
            }

            if (treeView1.SelectedNode.Text == "浏览收入")
            {
                FormIncome formIncome = new FormIncome();
                formIncome.ShowDialog();
            }

        }
        private void MainForm_Load(object sender, EventArgs e)
        {

        }
    }
}
